package com.device.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.device.domain.CabinetSlot;
import com.device.mapper.CabinetSlotMapper;
import com.device.service.ICabinetSlotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 肆
 * @description 针对表【cabinet_slot(柜机插槽表)】的数据库操作Service实现
 * @createDate 2025-03-25 21:53:31
 */
@Service
public class CabinetSlotServiceImpl extends ServiceImpl<CabinetSlotMapper, CabinetSlot> implements ICabinetSlotService {


    @Autowired
    CabinetSlotMapper cabinetSlotMapper;

    /**
     * 扫码-根据插槽编号获取插槽信息
     */
    @Override
    public CabinetSlot getBtSlotNo(Long cabinetId, String slotNo) {
        return cabinetSlotMapper.selectOne(new LambdaQueryWrapper<CabinetSlot>()
                .eq(CabinetSlot::getCabinetId, cabinetId)
                .eq(CabinetSlot::getSlotNo, slotNo));
    }
}




